package org.xteam.sled.semantic.exp;

import org.xteam.sled.semantic.ConstructorType;

public class ExpBindingInstance extends Exp {

	private String name;
	private boolean isWild;
	private ConstructorType constype;

	public ExpBindingInstance(String name, boolean isWild, ConstructorType constype) {
		this.name = name;
		this.isWild = isWild;
		this.constype = constype;
	}
	
	public String name() {
		return name;
	}
	
	public boolean wild() {
		return isWild;
	}

	@Override
	public void visit(IExpVisitor visitor) {
		visitor.visitBindingInstance(this);
	}
	
	@Override
	public String toString() {
		return name + "(" + constype.name() + ")";
	}

}
